const log = require('./log');

const menus = [
    {id:"sysMgmt",path:'sys', title:'系统管理',icon:'rs-icon-mgmt',
        menus:[
            {id:"sysMgmtUser",path:'user', title:'用户管理',icon:'rs-icon-user',keepAlive:true},
            {id:"sysMgmtUnit",path:'unit', title:'机构管理',icon:'rs-icon-unit',keepAlive:true},
            {id:"sysMgmtRole",path:'role', title:'角色管理',icon:'rs-icon-role',keepAlive:true},
            {id:"sysMgmtMenu",path:'menu', title:'菜单管理',icon:'el-icon-menu',keepAlive:true},
            {id:"sysMgmtAuth",path:'auth', title:'权限管理',icon:'rs-icon-auth',keepAlive:true}
        ]
    },
    {id:"menu2",path:'menu2', title:'测试菜单2',icon:'el-icon-menu'},
    {id:"menu3",path:'menu3', title:'测试菜单3',icon:'el-icon-document'},
    {id:"menu4",path:'menu4', title:'测试菜单4',icon:'rs-icon-leaf'},
    {id:"menu5",path:'menu5', title:'测试菜单5',icon:'rs-icon-leaf'},
]

module.exports = {
    menus:menus,
    loadMenu:function(req,res){

        setTimeout(() => {
            res.status(200).json({
                error: 0,
                menus:menus
            });
        }, 100);
    }
}